package com.motong.gongdan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.motong.gongdan.entity.PrintTemplate;
import com.motong.gongdan.mapper.PrintTemplateMapper;
import com.motong.gongdan.vo.system.printTemplate.query.ListQuery;
import com.motong.gongdan.vo.system.printTemplate.vo.ListVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PrintTemplateService extends ServiceImpl<PrintTemplateMapper, PrintTemplate> {

    @Resource
    private PrintTemplateMapper printTemplateMapper;

    /**
     * 获取打印模板列表
     *
     * @param listQuery 请求参数
     */
    public Page<ListVo> getList(ListQuery listQuery) {
        return printTemplateMapper.getList(new Page<>(listQuery.getPage(), listQuery.getLimit()), listQuery);
    }
}
